<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    {include file="/layout/scriptload"}
    <title>复粉监控室</title>
</head>
<body>
<div class="box">
    <section class="content-header">
        <ol class="breadcrumb">
            <li><a><i class="fa fa-dashboard"></i> 监控室</a></li>
            <li class="active">复粉监控室</li>
        </ol>
    </section>
    <!-- /.box-header -->
    <section class="content">
    <div class="box-body">
        <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
            <ul class="layui-tab-title">
                <li class="layui-this">统计</li>
                <li>投放</li>
                <li>复粉</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-12">
                                <div id="example1_filter" class="dataTables_length">
                                    <label>
                                        <input type="search" id="keyword" class="form-control input-sm" placeholder="微信号" aria-controls="example1">
                                    </label>
                                    <button type="button" id="search" class="btn margin" style="background: #18bc9c;color: #ffffff;">搜索</button>
                                    <div class="form-group">
                                        <label>分类筛选：</label>
                                        <select id="select" class="form-control select2" style="width: 120px;">
                                            <option value="" selected="selected">一级分类</option>
                                            {volist name="category" id="v"}
                                            <option value="{$v.id}">{$v.categoryname}</option>
                                            {/volist}
                                        </select>
                                        <select id="select2" class="form-control select2" style="width: 120px;">
                                            <option selected="selected">二级分类</option>
                                        </select>
                                    </div>
                                    <div type="button" id="refresh" class="btn margin bg-aqua pull-right">手动刷新</div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="example1" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                    <tr role="row">
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 190px;">微信号</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">总净增数</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">09:45</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">09:50</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">09:55</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px">10:00</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::05</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::10</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::15</th>
                                    </tr>
                                    </thead>
                                    <tbody id="tb_sum">
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-12">
                                <div id="example1_filter" class="dataTables_length">
                                    <label>
                                        <input type="search" id="keyword" class="form-control input-sm" placeholder="账号名称，ghid" aria-controls="example1">
                                    </label>
                                    <button type="button" id="search" class="btn margin" style="background: #18bc9c;color: #ffffff;">搜索</button>
                                    <div class="form-group">
                                        <label>分类筛选：</label>
                                        <select id="select" class="form-control select2" style="width: 120px;">
                                            <option value="" selected="selected">一级分类</option>
                                            {volist name="category" id="v"}
                                            <option value="{$v.id}">{$v.categoryname}</option>
                                            {/volist}
                                        </select>
                                        <select id="select2" class="form-control select2" style="width: 120px;">
                                            <option selected="selected">二级分类</option>
                                        </select>
                                    </div>
                                    <div type="button" id="refresh" class="btn margin bg-aqua pull-right">手动刷新</div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="example2" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                    <tr role="row">
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 190px;">投放账号</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">原始ID</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 322px;">总粉丝数</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 257px;">当日净增数</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">每小时净增数</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px">10:00</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::05</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::10</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::15</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::20</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::25</th>
                                        <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::30</th>
                                    </tr>
                                    </thead>
                                    <tbody id="tb_put">
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-tab-item">
                    <div id="example1_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
                        <div class="row">
                            <div class="col-sm-12">
                                <div id="example1_filter" class="dataTables_length">
                                    <label>
                                        <input type="search" id="keyword" class="form-control input-sm" placeholder="账号名称，ghid" aria-controls="example1">
                                    </label>
                                    <button type="button" id="search" class="btn margin" style="background: #18bc9c;color: #ffffff;">搜索</button>
                                    <div class="form-group">
                                        <label>分类筛选：</label>
                                        <select id="select" class="form-control select2" style="width: 120px;">
                                            <option value="" selected="selected">一级分类</option>
                                            {volist name="category" id="v"}
                                            <option value="{$v.id}">{$v.categoryname}</option>
                                            {/volist}
                                        </select>
                                        <select id="select2" class="form-control select2" style="width: 120px;">
                                            <option selected="selected">二级分类</option>
                                        </select>
                                    </div>
                                    <div type="button" id="refresh" class="btn margin bg-aqua pull-right">手动刷新</div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                        <div class="col-sm-12">
                            <table id="example3" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                <thead>
                                <tr role="row">
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 190px;">层级</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">复粉账号</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 322px;">原始ID</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 257px;">总粉丝数</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">当日净增粉</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 297px;">每小时净增粉</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px">10:00</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::05</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::10</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::15</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::20</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::25</th>
                                    <th class="sorting" tabindex="0" aria-controls="example1" rowspan="1" colspan="1" style="width: 120px;">10::30</th>
                                </tr>
                                </thead>
                                <tbody id="tb_tier">
                                </tbody>
                            </table>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- /.box-body -->
    </section>
</div>
</body>
<script>
    layui.use('element', function(){
        var element = layui.element;
    });

    $(function(){
        $('#select').change(function(){
            var _id=  $("#select").val();
            $.ajax({
                type: 'post',
                cache: false,
                url: '{:url("admin/Tencent/getCategoryList")}',
                data: {id: _id},
                success: function(data) {
                    if (data.code == "0") {
                        $("#select2 option").remove();
                        var html = '<option value="">请选择...</option>';
                        $("#select2").append(html);
                        $.each(data.info, function (index, item) {
                            var html = '<option value="' + item.id + '">' + item.categoryname + '</option>';
                            $("#select2").append(html);
                        });
                        table.destroy();
                        getlist(_keyword,_id);
                    }
                }
            });
        })
    })
</script>
</html>